home *** CD-ROM | disk | FTP | other *** search
/ Champak 83 / (Vol 83) My Disc.iso / Games / drying.swf / scripts / frame_132 / PlaceObject2_181_639 / CLIPACTIONRECORD onClipEvent(mouseUp).as < prev   
Text File  |  2008-08-08  |  2KB  |  50 lines

  1. onClipEvent(mouseUp){
  2.    if(this.state == "umbrellar")
  3.    {
  4.       _root.mcUmbrellar._visible = true;
  5.       this.state = "standard";
  6.       this.gotoAndStop("flstandard");
  7.    }
  8.    if(this.state == "cloth")
  9.    {
  10.       isOk = false;
  11.       i = 1;
  12.       while(i <= 4)
  13.       {
  14.          if(_root["mcCloth" + i].mcBody.hitTest(_root._xmouse,_root._ymouse) && _root["mcCloth" + i]._currentframe == 1)
  15.          {
  16.             isOk = true;
  17.             _root["mcCloth" + i].wait = 60 + random(60);
  18.             _root["mcCloth" + i].isWet = this.isWet;
  19.             _root["mcCloth" + i].gotoAndStop(this.clothnum + 1);
  20.             this.state = "ride";
  21.             this.gotoAndStop("flride");
  22.          }
  23.          i++;
  24.       }
  25.       if(isOk == false)
  26.       {
  27.          if(this._x < 80 && this.isWet == false)
  28.          {
  29.             this.drynum = this.drynum + 1;
  30.             _root["mcStack" + this.drynum].gotoAndStop(this.clothnum + 1);
  31.             sndStack = new Sound(this);
  32.             sndStack.attachSound("stack");
  33.             sndStack.start(0,1);
  34.             _root.mcPlayer.state = "standard";
  35.             _root.mcPlayer.gotoAndStop("flstandard");
  36.          }
  37.          else
  38.          {
  39.             _root.mcDroped._x = this._x;
  40.             _root.mcDroped._y = this._y + 50;
  41.             _root.mcDroped.num = this.clothnum;
  42.             _root.mcDroped.gotoAndPlay(2);
  43.             _root.mcDroped.mcScore.gotoAndPlay(1);
  44.             this.state = "standard";
  45.             this.gotoAndStop("flstandard");
  46.          }
  47.       }
  48.    }
  49. }
  50.